Repository navigation
Read two family names under locales.PT_BR and a new locales.PT_PT - #1481
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, missing test rows (#1453) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n to keep pt (#1453) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ale pt-PT example (#1453) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
derek73
added a commit
that referenced
this pull request
Nov 19, 2026
…1456, #1479) (#1485) * Divide a family of two surnames by its own words, behind a comma too (#1456, #1479) Under two_family_names the surname1/surname2 views now divide a family of two surnames however it was read: before a family comma, where a particle chain made it, behind a given name a particle completes (rules/P10), and the family O9's capitals named. One function, _post_rules._divide_family, decides for every path, O6's take included: P1's fold units over the family in written order, a bound given-name word counted with the word it completes, exactly two marked, a first unit of particles alone, a connective, a shared name and a Turkic father's name with its marker left whole. No field moves; nothing moves with the switch off. rules/O6, R10, R11, P10, O7 and O9 amended, with dated decisions entries; the connective and the one-word hyphen question stays open in decisions/R10. Case rows gain an optional views mapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Measure the division under the Portuguese packs #1481 turned on; list them (#1456, #1479) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record the four questions the PR raised as decided (#1456, #1479) The capitals family is divided, the moves the issues did not ask for are accepted, a lone particle ending a family stays the second unit, and the connective and the one-word hyphen stay open; decided 2026-11-19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * State the decided trailing particle in rules/O6 and its Standing line (#1456, #1479) The review of the decision commit found the lone particle ending a family decided only in a Log item, the rule's wording predicting a division for Smith van der, Juan, which the code leaves whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1453
What changes
locales.PT_BRreads two family names (Policy.two_family_names, rules/O6), from a[rules]table innameparser/vocab/pt-BR.toml, and carries a Portuguese given-name list that keeps a second given name out of the family.parser_for(locales.PT_BR).parse("Ana Souza Lima")gives familySouza Lima, where 3.0 and 3.1 gave middleSouza, familyLima;Ana Beatriz Costakeeps familyCosta.locales.PT_PTfor names from Portugal: it choosespt-PT, readspt.toml's words aslocales.PTdoes, and turns on the same switch with the same list. Its table is in a newnameparser/vocab/pt-PT.toml, which holds the[rules]table and no word. The name follows the existing country-pack convention:ES_ARandPT_BRuse the BCP 47 tag with an underscore, upper-cased for the attribute (pt_pt/PT_PT).--locale pt-PTon the command line now names it, where before it was refused and told the user to usept.locales.PTis unchanged.pt.tomlholds no table,rules_patch("pt")raises, and a test holds both. Spanish is the reverse: there the language pack carries the switch. The docs say why:ptis chosen for Portuguese names from any country, and Angolan and Mozambican names lose under the switch.nameparser/locales/_pt_given_names.py, 721 entries. It is generated by the newtools/pt_given_names.pyfrom ORCID's given and family boxes (CC0), pooling Portugal and Brazil.config_diff.py score --cap 3000reads, so the list is never scored on the records it was built from.goncalo,constanca), as the Spanish lists do for ñ (Should "Maria Begona Lopez" under locales.ES keep Begona out of the family, as "María Begoña López" does? #1081).REMOVEDis empty. The vocabulary filter took outdr._CREDITED; that section lists only the sources whose licences ask for credit.Per-country figures
Measured with
config_diff.py score, ORCID's boxes, every box agreeing, at most 3,000 records a country, none of them used to build the list.PTread these records alike, but for one Angolan and one Brazilian record.PT_BRandPT_PTread them alike.PTPT_BR/PT_PTBrazilian and Portuguese inventors on US patents. The switch costs Brazilian inventors 15.6 points over the whole corpus (75.7% → 60.2%) and gains Portuguese inventors about 8.5 points (57.6% → 66.1%).
Jr.there.Eder Ferreira/Rangel): 2,696;Jurandir Itizo/Yanagihara): 1,274;pt_brorpt_ptfor names whose family part is written whole, and keepptfor data filed with a single surname as the family name.The cut
Lists were scored the same way (decisions/O6's entry has the full table).
What is left wrong, by shape (under
PT_BR, cap 3,000)mateus,bernardo,tadeu)Families of three or more surnames are not part of this change; they are #1482. They are the largest gap in ORCID Portugal and ORCID Brazil, and the switch broke none of them.
Moves on names as written
tse-donors, 848,351 Brazilian names.PT_BRagainst 3.1's pack moves 500,485 names, all into the family:alves,pereira,silva);cezar,tadeu,bernardo);e.PT_BRmoves 1,543 of 7,644 names, nearly all non-Portuguese names of three or more words: the switch's declared cost.ptfile.cldr_agreement_locales.jsonis re-recorded.locales.PTmove nothing.snapshot.jsonlgains one rule example text, rules/S11'sJOSE CARLOS F, and changes no reading.locales.PT_BRor parser pickled by 3.1 still loads, and reads as 3.1 did (checked against the 3.1.0 wheel). docs/migrate.rst says so.Also changed
tests/v2/test_layering.py's data-module rule now lets a language pack's country packs import its data module too (_pt_given_names.py→pt_br,pt_pt). This widens the check, soes_armay now import_es_given_namesas well. The narrower rule's refusals keep their rows:pt→_es_given_namesandes→_es_ar_given_names, plus a newpt_br→_es_given_names.config_diff.py.LANGUAGES_OF["PT"]is("pt-PT",), like Brazil'spt-BR, so--languages ptno longer reaches Portugal's records.gap_specsreads a plain choice of a rules-only file's tag as its pack, not the default.cldr_agreement.pylistsPT_PTinNO_CLDR, since CLDR 48 has nopt_PTnames file.PT_BR,JOSE CARLOS SILVA Fnow reads familySILVA F. The example is kept with that reading, andJOSE CARLOS Fis added for the letter alone; decisions/S11 carries a dated entry.docs/languages.rsthas a rewritten section on Portuguese two family names, with doctests, a per-country table and the PatentsView guidance.docs/locales.rstupdates the pack table and the Portuguese section.docs/migrate.rstadds "Changed in 3.2" forPT_BR.policy.rst,usage.rstandcustomize.rstmention the new pack.Checks
uv run pytestpasses (50,929 after merging master, which addedlocales.MY, Add locales.MY, a Burmese pack: U and Daw as titles, nine syllables kept name words #1480).uv run pytest -n0 -m serialpasses.uv run mypyanduv run ruff checkpass.sphinx-build -b doctest docsandpython -m doctest README.rstpass.jaextra, which this environment lacks.cases.pyrows were run against master. The fivefeat(#1453)rows fail there: fourPT_BRrows read otherwise, and thePT_PTrow has no pack on master. The three rows pinning unchanged readings underPTandPT_BR(the language pack, the list's veto, a particle family) read the same on master; the c-spelling row isPT_PT's.Reviews
Decisions (all three decided 2026-11-19)
PT_BRships with the switch on, as built. The PatentsView Brazil loss is accepted, and the pack knowingly misses the 2026-11-04 country-pack measure there. The loss is a filing convention (one surname in the family box) that no list can tell apart, while the populations whose names were split by the person or their own filer (ORCID, PSC) gain. decisions/O6's 2026-11-19 entry records this; the docs keep the guidance to useptfor data filed with a single surname.Ana Souza Lima Rochagives middleSouza, familyLima Rochaunderlocales.PT_BR) #1482. The decisions entry and the three-surname case row point there.🤖 Generated with Claude Code